home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gscrd.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  3.5 KB  |  94 lines

  1. /* Copyright (C) 1998, 1999 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: gscrd.h,v 1.2 2000/09/19 19:00:27 lpd Exp $ */
  20. /* Interface for CIE color rendering dictionary creation */
  21.  
  22. #ifndef gscrd_INCLUDED
  23. #  define gscrd_INCLUDED
  24.  
  25. #include "gscie.h"
  26.  
  27. /*
  28.  * Allocate and minimally initialize a CRD.  Note that this procedure sets
  29.  * the reference count of the structure to 1, not 0.  gs_setcolorrendering
  30.  * will increment the reference count again, so unless you want the
  31.  * structure to stay allocated permanently (or until a garbage collection),
  32.  * you should call rc_decrement(pcrd, "client name") *after* calling
  33.  * gs_setcolorrendering.
  34.  */
  35. int
  36.     gs_cie_render1_build(P3(gs_cie_render ** ppcrd, gs_memory_t * mem,
  37.                 client_name_t cname));
  38.  
  39. /*
  40.  * Initialize a CRD given all of the relevant parameters.
  41.  * Any of the pointers except WhitePoint may be zero, meaning
  42.  * use the default values.
  43.  *
  44.  * The actual point, matrix, range, and procedure values are copied into the
  45.  * CRD, but only the pointer to the color lookup table
  46.  * (RenderTable.lookup.table) is copied, not the table itself.
  47.  *
  48.  * If pfrom_crd is not NULL, then if the EncodeLMN, EncodeABC, or
  49.  * RenderTable.T procedures indicate that the values exist only in the
  50.  * cache, the corresponding values will be copied from pfrom_crd.
  51.  * Note that NULL values for the individual pointers still represent
  52.  * default values.
  53.  */
  54. int
  55.     gs_cie_render1_init_from(P15(gs_cie_render * pcrd, void *client_data,
  56.                  const gs_cie_render * pfrom_crd,
  57.                  const gs_vector3 * WhitePoint,
  58.                  const gs_vector3 * BlackPoint,
  59.                  const gs_matrix3 * MatrixPQR,
  60.                  const gs_range3 * RangePQR,
  61.                  const gs_cie_transform_proc3 * TransformPQR,
  62.                  const gs_matrix3 * MatrixLMN,
  63.                  const gs_cie_render_proc3 * EncodeLMN,
  64.                  const gs_range3 * RangeLMN,
  65.                  const gs_matrix3 * MatrixABC,
  66.                  const gs_cie_render_proc3 * EncodeABC,
  67.                  const gs_range3 * RangeABC,
  68.                  const gs_cie_render_table_t * RenderTable));
  69. /*
  70.  * Initialize a CRD without the option of copying cached values.
  71.  */
  72. int
  73.     gs_cie_render1_initialize(P14(gs_cie_render * pcrd, void *client_data,
  74.                   const gs_vector3 * WhitePoint,
  75.                   const gs_vector3 * BlackPoint,
  76.                   const gs_matrix3 * MatrixPQR,
  77.                   const gs_range3 * RangePQR,
  78.                   const gs_cie_transform_proc3 * TransformPQR,
  79.                   const gs_matrix3 * MatrixLMN,
  80.                   const gs_cie_render_proc3 * EncodeLMN,
  81.                   const gs_range3 * RangeLMN,
  82.                   const gs_matrix3 * MatrixABC,
  83.                   const gs_cie_render_proc3 * EncodeABC,
  84.                   const gs_range3 * RangeABC,
  85.                   const gs_cie_render_table_t * RenderTable));
  86.  
  87. /*
  88.  * Set or access the client_data pointer in a CRD.
  89.  * The macro is an L-value.
  90.  */
  91. #define gs_cie_render_client_data(pcrd) ((pcrd)->client_data)
  92.  
  93. #endif /* gscrd_INCLUDED */
  94.